3.17 \(\int \csc ^2(c+d x) (a+b \tan (c+d x)) \, dx\)

Optimal. Leaf size=25 \[ \frac{b \log (\tan (c+d x))}{d}-\frac{a \cot (c+d x)}{d} \]

[Out]

-((a*Cot[c + d*x])/d) + (b*Log[Tan[c + d*x]])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0783231, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 1, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.053, Rules used = {43} \[ \frac{b \log (\tan (c+d x))}{d}-\frac{a \cot (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]^2*(a + b*Tan[c + d*x]),x]

[Out]

-((a*Cot[c + d*x])/d) + (b*Log[Tan[c + d*x]])/d

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int \csc ^2(c+d x) (a+b \tan (c+d x)) \, dx &=\frac{\operatorname{Subst}\left (\int \frac{a+b x}{x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{a}{x^2}+\frac{b}{x}\right ) \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac{a \cot (c+d x)}{d}+\frac{b \log (\tan (c+d x))}{d}\\ \end{align*}

Mathematica [A]  time = 0.0594411, size = 36, normalized size = 1.44 \[ -\frac{a \cot (c+d x)}{d}-\frac{b (\log (\cos (c+d x))-\log (\sin (c+d x)))}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]^2*(a + b*Tan[c + d*x]),x]

[Out]

-((a*Cot[c + d*x])/d) - (b*(Log[Cos[c + d*x]] - Log[Sin[c + d*x]]))/d

________________________________________________________________________________________

Maple [A]  time = 0.077, size = 26, normalized size = 1. \begin{align*} -{\frac{\cot \left ( dx+c \right ) a}{d}}+{\frac{b\ln \left ( \tan \left ( dx+c \right ) \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)^2*(a+b*tan(d*x+c)),x)

[Out]

-a*cot(d*x+c)/d+b*ln(tan(d*x+c))/d

________________________________________________________________________________________

Maxima [A]  time = 1.38836, size = 34, normalized size = 1.36 \begin{align*} \frac{b \log \left (\tan \left (d x + c\right )\right ) - \frac{a}{\tan \left (d x + c\right )}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2*(a+b*tan(d*x+c)),x, algorithm="maxima")

[Out]

(b*log(tan(d*x + c)) - a/tan(d*x + c))/d

________________________________________________________________________________________

Fricas [B]  time = 2.49515, size = 171, normalized size = 6.84 \begin{align*} -\frac{b \log \left (\cos \left (d x + c\right )^{2}\right ) \sin \left (d x + c\right ) - b \log \left (-\frac{1}{4} \, \cos \left (d x + c\right )^{2} + \frac{1}{4}\right ) \sin \left (d x + c\right ) + 2 \, a \cos \left (d x + c\right )}{2 \, d \sin \left (d x + c\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2*(a+b*tan(d*x+c)),x, algorithm="fricas")

[Out]

-1/2*(b*log(cos(d*x + c)^2)*sin(d*x + c) - b*log(-1/4*cos(d*x + c)^2 + 1/4)*sin(d*x + c) + 2*a*cos(d*x + c))/(
d*sin(d*x + c))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan{\left (c + d x \right )}\right ) \csc ^{2}{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)**2*(a+b*tan(d*x+c)),x)

[Out]

Integral((a + b*tan(c + d*x))*csc(c + d*x)**2, x)

________________________________________________________________________________________

Giac [A]  time = 1.36389, size = 47, normalized size = 1.88 \begin{align*} \frac{b \log \left ({\left | \tan \left (d x + c\right ) \right |}\right ) - \frac{b \tan \left (d x + c\right ) + a}{\tan \left (d x + c\right )}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2*(a+b*tan(d*x+c)),x, algorithm="giac")

[Out]

(b*log(abs(tan(d*x + c))) - (b*tan(d*x + c) + a)/tan(d*x + c))/d